This minor version has been deprecated
MuleSoft Accelerator for Salesforce B2C Commerce Cloud icon

MuleSoft Accelerator for Salesforce B2C Commerce Cloud

(1 review)

SAP Custom BAPI setup guide - Inventory

The following provides guidance on how to use the custom BAPI code (ZBAPIFM\_MATERIAL\_GET\_DATA) for your SAP instance.

Important: You must complete the following instructions before proceeding to Use case 2 – Inventory.

BAPI custom objects

You must create the following ABAP objects in order to use this custom BAPI, which are described below.

Data elements:

  • ZBAPI_MATERIALDTE_DATE
  • ZBAPI_MATERIALDTE_TIME

Structures

  • ZBAPI_MATERIALSTR_RNG_DATES
  • ZBAPI_MATERIALSTR_RNG_TIME
  • ZBAPISTR_MATERIAL_DATA_IN
  • ZBAPISTR_INVENTORY_DATA_IN
  • ZBAPISTR_MATERIAL_DATA_OUT
  • ZBAPISTR_INVENTORY_DATA_OUT

Table types:

  • ZBAPITTY_MATERIAL_DATA_OUT
  • ZBAPITTY_INVENTORY_DATA_OUT
  • ZBAPI_MATERIALTTY_RNG_DATES
  • ZBAPI_MATERIALTTY_RNG_TIME

Class/interface: (optional, needed to handle exceptions)

  • ZCL_EXCEPTION_HELPER

Function group:

  • ZBAPIFGR_MATERIAL

Data elements

ObjectHow to create
ZBAPI_MATERIALDTE_DATEsfc-b2c-com-bapi_01.png
ZBAPI_MATERIALDTE_TIMEsfc-b2c-com-bapi_02.png

Structures

ObjectHow to create
ZBAPI_MATERIALSTR_RNG_DATESsfc-b2c-com-bapi_03.png
ZBAPI_MATERIALSTR_RNG_TIMEsfc-b2c-com-bapi_04.png
ZBAPISTR_MATERIAL_DATA_INsfc-b2c-com-bapi_05.png
ZBAPISTR_INVENTORY_DATA_INsfc-b2c-com-bapi_06.png
ZBAPISTR_MATERIAL_DATA_OUTsfc-b2c-com-bapi_07.png
sfc-b2c-com-bapi_08.png
ZBAPISTR_INVENTORY_DATA_OUTsfc-b2c-com-bapi_09.png

Table types

ObjectHow to create
ZBAPITTY_MATERIAL_DATA_OUTsfc-b2c-com-bapi_10.png
ZBAPITTY_INVENTORY_DATA_OUTsfc-b2c-com-bapi_11.png
ZBAPI_MATERIALTTY_RNG_DATESsfc-b2c-com-bapi_12.png
ZBAPI_MATERIALTTY_RNG_TIMEsfc-b2c-com-bapi_13.png

Class/Interface

ZCL_EXCEPTION_HELPER

This class is used to handle the BAPI messages. In this case, the method used is S_SYST_TO_RETURN:

sfc-b2c-com-bapi_14.png

sfc-b2c-com-bapi_15.png

Creating a function group

The following describes how to create a function group named ZBAPIFGR_MATERIAL:

  1. Create function module ZBAPIFM_MATERIAL_GET_DATA, using “Remote-enable module” as processing type:

    sfc-b2c-com-bapi_16.png

  2. Complete the import parameters with the following:

    sfc-b2c-com-bapi_17.png

  3. Complete the export parameters with the following:

    sfc-b2c-com-bapi_18.png

  4. Copy and paste the code from ZBAPIFM_MATERIAL_GET_DATA.txt, and then activate it.

  5. Create ZBAPI_MATERIAL_MSG message class with the following messages:

    sfc-b2c-com-bapi_19.png


Reviews

TypeCustom
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onOct 30, 2020
Asset overview

Asset versions for 1.3.x

Asset versions
StatusVersionActions
1.3.0